package com.azt.api.pojo;

import java.util.Date;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang.StringUtils;

import com.alibaba.fastjson.JSONObject;
import com.azt.api.dto.WeixinInfo;

/** 
 * @ClassName: SignUp 
 * @Description: 报名管理
 * @author: zhaheng
 * @date: 2017年3月28日 上午11:37:24  
 */
@Table(name = "azt_signup")
public class SignUp {

    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    
	private Integer meetingId;//会议id

	private String mobile;
    
    private String realName;
    
    private String companyName;
    
    private String weixinid;//微信号
    
    private String weixin;//微信
    
    private String seatNo;//座位
    
    private Integer seatConfirm;//座位确认
    
    private String gate;//门
    
    private String post;//职位
    
    private Integer ifMsg;//短信发送

	private Integer ifPay;//是否支付（0否1是）
    
    private String memo;//备注
    
    private Integer usable;//是否可用
    
    private Integer ifMember;//是否安装通会员
    
    private String wantcooper;//合作意向
    
    private Integer wantrole;//担任角色
    
    private Date createtime;

    private Date updatetime;
    
    @Transient
	private WeixinInfo weixinInfo;//微信
    
    @Transient
    private Meeting meeting;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

    public Integer getMeetingId() {
		return meetingId;
	}

	public void setMeetingId(Integer meetingId) {
		this.meetingId = meetingId;
	}
	
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getWeixinid() {
		return weixinid;
	}

	public void setWeixinid(String weixinid) {
		this.weixinid = weixinid;
	}

	public String getWeixin() {
		return weixin;
	}

	public void setWeixin(String weixin) {
		this.weixin = weixin;
	}

	public String getSeatNo() {
		return seatNo;
	}

	public void setSeatNo(String seatNo) {
		this.seatNo = seatNo;
	}

	public Integer getSeatConfirm() {
		return seatConfirm;
	}

	public void setSeatConfirm(Integer seatConfirm) {
		this.seatConfirm = seatConfirm;
	}

	public String getGate() {
		return gate;
	}

	public void setGate(String gate) {
		this.gate = gate;
	}

	public String getPost() {
		return post;
	}

	public void setPost(String post) {
		this.post = post;
	}

	public Integer getIfMsg() {
		return ifMsg;
	}

	public void setIfMsg(Integer ifMsg) {
		this.ifMsg = ifMsg;
	}
	
    public Integer getIfPay() {
		return ifPay;
	}

	public void setIfPay(Integer ifPay) {
		this.ifPay = ifPay;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public Integer getUsable() {
		return usable;
	}

	public void setUsable(Integer usable) {
		this.usable = usable;
	}

	public Integer getIfMember() {
		return ifMember;
	}

	public void setIfMember(Integer ifMember) {
		this.ifMember = ifMember;
	}

	public String getWantcooper() {
		return wantcooper;
	}

	public void setWantcooper(String wantcooper) {
		this.wantcooper = wantcooper;
	}

	public Integer getWantrole() {
		return wantrole;
	}

	public void setWantrole(Integer wantrole) {
		this.wantrole = wantrole;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getUpdatetime() {
		return updatetime;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

    public WeixinInfo getWeixinInfo() {
    	String weixinjson=getWeixin();
    	if(StringUtils.isNotBlank(weixinjson)){
    		JSONObject jsonObject=JSONObject.parseObject(weixinjson);
    		return jsonObject.toJavaObject(WeixinInfo.class);
    	}else{
    		return null;
    	}
    
	}

	public void setWeixinInfo(WeixinInfo weixinInfo) {
		this.weixinInfo = weixinInfo;
	}
	
    public Meeting getMeeting() {
		return meeting;
	}

	public void setMeeting(Meeting meeting) {
		this.meeting = meeting;
	}
    
	
}
